The Sections Collection

All report objects, such as Fields and Text objects, are contained within Sections. Often, you can obtain these directly by referring to the name property of an object in your code.

Note:    There may be times, however, when you need to obtain an object through the report section it is in. At other times, you may have a need to make changes to the section itself.

Every report contains a collection of its sections, stored in the Sections property of the report object. You can access individual sections through this collection. For example, the code below sets the height of the first section of the report (the Report Header) to half an inch (720 twips) and suppresses the second section of the report (the Page Header) so that it will not appear.

Dim Report As New CrystalReport1
Report.Sections.Item(1).Height = 720
Report.Sections.Item(2).Suppress = True

For information on how to obtain and work with other objects within a Section object, such as fields and text objects, refer to The ReportObjects collection.

Each section in a report is itself a collection. The collection contains all of the report objects in that section. When designing your application, be aware that when a section is being formatted, all objects in that section are also being formatted. Also, all other sections and objects outside of the current section are not being formatted. This information can affect how data is displayed in various sections of the report, depending on your code.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com